<?php

require_once __DIR__ . '/admin/Bootstrap.php';
require __DIR__ . '/site2/config/config.inc.php';
require_once __DIR__.'/site2/includes/SalesMgr.class.php';
require_once  __DIR__.'/utils/AuthenticationUtils.php';
require_once(MYSQL);

$_main_content = new Templater();
$_page = new Templater();
// process login
AuthenticationUtils::authenticateSFLogin();
include __DIR__.'/utils/prefix.php';

$salesMgr= new SalesMgr($dbc);
$_main_content->load(__DIR__.'/site2/views/product/list.html');
$_main_content->set('products',$salesMgr->getSaleProducts());

$_page->load(__DIR__ . '/site2/views/page/page.html');
$_page->set("content", $_main_content->parse());
$_page->publish();
